package com.guangyuan.network.interval;

import java.sql.Connection;

import org.apache.log4j.Logger;

import com.guangyuan.network.constants.SqlType;
import com.guangyuan.network.dao.DBFactory;
import com.guangyuan.network.datasource.pool.util.ConnectionUtil;

public class DefaultCache {
	protected static Logger logger = Logger.getLogger(DefaultCache.class);
	
	protected static Object execute(Object[] parameters, String sql,
			SqlType type) {
		
		Connection conn = ConnectionUtil.getConnection();
		Object result = DBFactory.getDefaultDao().executeSql(conn, sql,
				parameters, type);
		ConnectionUtil.closeConnection(conn);
		return result;
	}
	
	
}
